<?php
/**
 *      [迷你云] (C)2009-2012 南京恒为网络科技.
 *   软件仅供研究与学习使用，如需商用，请访问www.miniyun.cn获得授权
 * 
 */
?>
<?php


class MDataController
extends MApplicationComponent
implements MIController
{
	private $_common_uri = null;
	
	public function invoke($uri=null)
	{
								parent::init();
								$url_manager = new MUrlManager();
		$parse_array = $url_manager->parseActionFromUrl();
		$action = $parse_array["action"];
		if ($action === false||empty($action))
		{
			throw new MException(FXP::t(MConst::INVLID_REQUEST), OPE_FALSE);
		}
		$this->_common_uri = $parse_array["uri"];
		return $this->$action();
	}

	
	private function down_shares()
	{
		$down_controller = new MDownSharesController();
		$down_controller->invoke($this->_common_uri);
	}






		


	
	private function upload_file()
	{
		$upload_file_controller = new MUploadFileController();
		$upload_file_controller->invoke();
	}

	
	private function part_upload()
	{
		$part_upload_controller = new MPartUploadController();
		$part_upload_controller->invoke();
	}

	
	private function merge_big_part()
	{
		$merge_big_part_controller = new CMergeBigPartController();
		$merge_big_part_controller->invoke();
	}

	
	private function part_download()
	{
		$part_download_controller = new MPartDownloadController();
		$part_download_controller->invoke();
	}

}
